<?php

/**
 * @Description    职位验证
 * @Author         zhaojiping
 * @Copyright      山东艾思软件科技有限公司(https://www.aisisofit.cn)
 * @Date           2022/2/7
 * @CreateBy       VS Code
 */

namespace app\core\validate;

use think\Validate;

class CoreDepartment extends Validate {

    protected $rule = [
        'name' => 'require|unique:core_department|max:20',
        'sort' => 'number|between:0,99999',
        'is_shop' => 'number|between:0,9',
    ];

    protected $message = [
        'name.require'  => '请输入职位名称',
        'name.max'      => '职位名称不能超过20个字符',
        'name.unique'   => '职位名称已经存在',
        'sort.number'   => '排序字段必须是个整数',
        'is_shop.number'   => '是否是门店字段必须是个整数',
        'is_shop.between'   => '是否是门店字段长度有误',
    ];
}
